<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: magic_attachsize.php 6757 2010-03-25 09:01:29Z cnteacher $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

if(submitcheck("usesubmit")) {

	$rate = $magic['custom']['addsize'] ? intval($magic['custom']['addsize']) : 10;
	$addsize = 1048576 * $rate;
	DB::query('UPDATE '.DB::table('common_member')." SET addsize = addsize + $addsize WHERE uid='$_G[uid]'");

	magic_use($mid, array(), true);
	showmessage('magicuse_success', dreferer());

}

?>